package com.link2room.rodimus.service;

import com.link2room.rodimus.dto.result.base.CouponConsumeTempDto;
import com.link2room.rodimus.dto.result.base.DrawPrizeBaseDto;
import com.link2room.rodimus.entity.DrawPrizeBaseEntity;

import java.util.List;

/**
 * Created by LN on 2017/7/11.17:41
 */
public interface IDrawService {
    /**
     * 抽奖
     * @param activityCode
     * @return
     * @throws Exception
     */
    @Deprecated
    DrawPrizeBaseDto doDraw(String activityCode) throws Exception;

    /**
     * 生成抽奖流水号
     * @return
     */
    String generateDrawCouponNo() throws Exception;

    DrawPrizeBaseDto doDraw(String lhotelGroupCode, String activityCode, String drawCode, CouponConsumeTempDto couponConsumRes) throws InterruptedException, Exception;

    /**
     * 更新奖项
     * @param deletes
     * @param updateEntities
     */
    void updatePrizeBases(List<DrawPrizeBaseEntity> deletes, List<DrawPrizeBaseEntity> updateEntities) throws Exception;
    /**
     * 修改奖池
     * @param lhotelGroupCode
     * @param activityCode
     * @param prizeCode
     * @param availableCount
     */
    void jackPotUpdate(String lhotelGroupCode, String activityCode, String prizeCode, Integer availableCount) throws Exception;

	DrawPrizeBaseDto doDrawWithPrizeCode(String lhotelGroupCode, String activityCode, String prizeCode, CouponConsumeTempDto couponConsumRes) throws Exception;
}
